package com.ch.home.testService;

import com.ch.home.bean.Feedback;
import com.ch.home.service.serviceImpl.userServiceImpl.FeedbackServiceImpl;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.Date;

/**
 * Created by CHEN on 2019/8/24.
 */
@RunWith(SpringRunner.class)
@SpringBootTest
public class testFeedbackServiceImpl {


    @Autowired
    FeedbackServiceImpl feedbackService;

    @Test
    public void testAddFeedback(){

        System.out.println(feedbackService.addFeedback(new Feedback(null,2,"我觉得很不错",new Date())));


    }
    @Test
    public void testGetFeedback(){
        System.out.println(feedbackService.getFeedback(null, null, null) );
        System.out.println("----------------------------------------------" );
        System.out.println(feedbackService.getFeedback(2, null, null) );
        System.out.println("----------------------------------------------" );
        System.out.println(feedbackService.getFeedback(null, null, new Date( )) );
    }
}
